const sequelize = require('../config/database');
const Announcement = require('../models/Announcement');

(async () => {
  await sequelize.sync(); // 确保表已创建
  await Announcement.create({
    title: '系统维护通知',
    content: '本系统将于2024-06-01 00:00-02:00进行维护，期间暂停服务。',
    createdBy: 1
  });
  await Announcement.create({
    title: '新功能上线',
    content: '简历智能筛选功能已上线，欢迎体验！',
    createdBy: 1
  });
  await Announcement.create({
    title: '招聘季活动',
    content: '2024届毕业生专场招聘会火热进行中，欢迎企业和同学们踊跃参与！',
    createdBy: 1
  });
  console.log('公告样例数据插入完成');
  process.exit();
})(); 